{% extends 'base.html' %}

{% block content %}
    <form class="form authorization-form"
          id="authorization-form"
          method="post"
          action="{% url 'users:login' %}"
          spellcheck="false">
        {% csrf_token %}

        <div class="message-block explanation-of-authorization">
            <h2 class="heading">Авторизация</h2>
            <p class="explanation">Введите вашу почту и пароль для входа авторизации на сайте</p>
        </div>

        {% if list_of_errors %}
            <div class="message-block message-authorization-error">
                <h2 class="heading">
                    Ошибка авторизации
                </h2>
                {% for error in list_of_errors %}
                    <p class="explanation">{{ error }}</p>
                {% endfor %}
            </div>
        {% endif %}
        {% for field in form %}
            <label for="authorization-form">
                {{ field.label }}
            </label>
            {{ field }}
        {% endfor %}
        <button type="submit" class="standard-button authorization-button">Войти</button>
    </form>
{% endblock content %}